<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>后台管理</title>
		<link rel="stylesheet" type="text/css" href="css/main.css"/>
	</head>
	<body class="logo-bg">
		<div class="nav-head">
			<div class="container">
				<a href="index.html" class="nav-item pull-left logo"></a>
				<div class="pull-right">
					<div class="nav-item">
						<img class="nav-user" src="image/user-image.jpg" />
					</div>
				</div>
			</div>
		</div>
		<div class="container page-container">
			<div class="page-bg page-header-fixed">
				<div class="pull-left page">
					<ul class="menu-list">
						<li class="active"><a>用户列表</a></li>
					</ul>
				</div>
				<div class="page-content">
					
				</div>
			</div>
		</div>
		<script>
			window.onload = function(){
				var xmlhttp;
				if (window.XMLHttpRequest){
					// IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
					xmlhttp=new XMLHttpRequest();
				}else{
					// IE6, IE5 浏览器执行代码
					xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				xmlhttp.onreadystatechange=function(){
					if (xmlhttp.readyState==4 && xmlhttp.status==200){
						document.getElementsByClassName("page-content")[0].innerHTML=xmlhttp.responseText;
					}
				}
				xmlhttp.open("GET","user-list.html",true);
				xmlhttp.send();
				
				people = [
					{name:'张三',id:'1',sex:'1'},
					{name:'李四',id:'2',sex:'0'},
					{name:'赵柳',id:'3',sex:'0'}
				];
				pp = {name:'王武',id:'5',sex:'0'};
				for(var i = 0; i < people.length; i++){
					if(people[i].name.indexOf('李四') != -1){
						people[i] = pp;
					}
				}
				console.log(people);
			}
			function add(){
				var xmlhttp1;
				if (window.XMLHttpRequest){
					// IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
					xmlhttp1=new XMLHttpRequest();
				}else{
					// IE6, IE5 浏览器执行代码
					xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
				}
				xmlhttp1.onreadystatechange=function(){
					if (xmlhttp1.readyState==4 && xmlhttp1.status==200){
						document.getElementsByClassName("page-content")[0].innerHTML=xmlhttp1.responseText;
					}
				}
				xmlhttp1.open("GET","add.html",true);
				xmlhttp1.send();
			}
		</script>
	</body>
</html>
